Login and get codingGiven a listing of files for our community branch, determine:
- Who opened the most pull requests (excluding PyBites)?
- Which challenge has the most pull requests?
Complete the functions
gen_files
anddiehard_pybites
below.The
docstring
for each function contains more information to help you solve the problem.Here is an example of how it should work:
>>> from urllib.request import urlretrieve
>>> from pcc_stats import diehard_pybites, gen_files
>>> urlretrieve('https://bites-data.s3.us-east-2.amazonaws.com/dirnames.txt', 'tempfile.txt')
('tempfile.txt', <http.client.HTTPMessage object at 0x7fc244708110>)
>>> ret = gen_files(tempfile='tempfile.txt')
>>> type(ret)
<class 'generator'>
>>> list(ret)
['03/mridubhatnagar', '03/aleksandarknezevic', '04/blair_young', '04/data', '32/bbelderbos', ...]
>>> diehard_pybites()
Stats(user='clamytoe', challenge=('01', 7))
>>> diehard_pybites(
... files=[
... "22/wonderfulboyx",
... "25/bbelderbos", # ignored
... "25/clamytoe",
... "21/wonderfulboyx",
... "25/santiagobenitez",
... "23/santiagobenitez",
... "07/santiagobenitez"])
Stats(user='santiagobenitez', challenge=('25', 2))
468 out of 478 users completed this Bite.
Will you be the 469th person to crack this Bite?
Resolution time: ~72 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 5.44 on a 1-10 difficulty scale.
» Up for a challenge? 💪